<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QTextBlockGroup Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QTextBlockGroup Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QTextBlockGroup class provides a container for text blocks
within a <a href="qtextdocument.html">QTextDocument</a>. <a href="#details">More...</a></p>

<p>Inherits <a href="qtextobject.html">QTextObject</a>.</p><p>Inherited by <a href="qtextlist.html">QTextList</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qtextblockgroup.html#QTextBlockGroup">__init__</a></b> (<i>self</i>, QTextDocument&#160;<i>doc</i>)</li><li><div class="fn" /><b><a href="qtextblockgroup.html#blockFormatChanged">blockFormatChanged</a></b> (<i>self</i>, QTextBlock&#160;<i>block</i>)</li><li><div class="fn" /><b><a href="qtextblockgroup.html#blockInserted">blockInserted</a></b> (<i>self</i>, QTextBlock&#160;<i>block</i>)</li><li><div class="fn" />list-of-QTextBlock <b><a href="qtextblockgroup.html#blockList">blockList</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextblockgroup.html#blockRemoved">blockRemoved</a></b> (<i>self</i>, QTextBlock&#160;<i>block</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QTextBlockGroup class provides a container for text blocks
within a <a href="qtextdocument.html">QTextDocument</a>.</p>
<p>Block groups can be used to organize blocks of text within a
document. They maintain an up-to-date list of the text blocks that
belong to them, even when text blocks are being edited.</p>
<p>Each group has a parent document which is specified when the
group is constructed.</p>
<p>Text blocks can be inserted into a group with <a href="qtextblockgroup.html#blockInserted">blockInserted</a>(), and
removed with <a href="qtextblockgroup.html#blockRemoved">blockRemoved</a>(). If a
block's format is changed, <a href="qtextblockgroup.html#blockFormatChanged">blockFormatChanged</a>()
is called.</p>
<p>The list of blocks in the group is returned by <a href="qtextblockgroup.html#blockList">blockList</a>(). Note that the
blocks in the list are not necessarily adjacent elements in the
document; for example, the top-level items in a multi-level list
will be separated by the items in lower levels of the list.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QTextBlockGroup" />QTextBlockGroup.__init__ (<i>self</i>, <a href="qtextdocument.html">QTextDocument</a>&#160;<i>doc</i>)</h3><p>Creates a new new block group for the given <i>document</i>.</p>
<p><b>Warning:</b> This function should only be called from
<a href="qtextdocument.html#createObject">QTextDocument.createObject</a>().</p>


<h3 class="fn"><a name="blockFormatChanged" />QTextBlockGroup.blockFormatChanged (<i>self</i>, <a href="qtextblock.html">QTextBlock</a>&#160;<i>block</i>)</h3><p>This function is called whenever the specified <i>block</i> of
text is changed. The text block is a member of this group.</p>
<p>The base class implementation does nothing.</p>


<h3 class="fn"><a name="blockInserted" />QTextBlockGroup.blockInserted (<i>self</i>, <a href="qtextblock.html">QTextBlock</a>&#160;<i>block</i>)</h3><p>Appends the given <i>block</i> to the end of the group.</p>
<p><b>Warning:</b> If you reimplement this function you must call
the base class implementation.</p>


<h3 class="fn"><a name="blockList" />list-of-QTextBlock QTextBlockGroup.blockList (<i>self</i>)</h3><p>Returns a (possibly empty) list of all the blocks that are part
of the block group.</p>


<h3 class="fn"><a name="blockRemoved" />QTextBlockGroup.blockRemoved (<i>self</i>, <a href="qtextblock.html">QTextBlock</a>&#160;<i>block</i>)</h3><p>Removes the given <i>block</i> from the group; the block itself
is not deleted, it simply isn't a member of this group anymore.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;snapshot-4.9.5-9eb6aac99275 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.3</td></tr></table></div></address></body></html>